<?php
$pagename = '题库';
include 'header.php';
?>
		<div id="nav">
			<h1><a href="index.php">NDSOJ</a></h1>
			<ul>
				<li><a href="index.php">首页</a></li>
				<?php if(!$_SESSION['login']) echo "<li><a href=\"reg.php\">注册</a></li>\n\t\t\t\t";
				?><li id="nav_current">题库</li>
				<li><a href="contest.php">比赛</a></li>
				<li><a href="discuss.php">讨论</a></li>
				<li><a href="help.php">帮助</a></li>
				<li><a href="about.php">关于</a></li>
			</ul>
		</div>
		<div id="mainbox">
			<h2>类型</h2>
			<table class="list"><tr><?php echo "\n";
				include 'var_type.php';
				for($i = 1; $i <= $problem_type_amount; $i++)
				{
					echo "\t\t\t\t\t<td><a href=\"problem_search.php?type={$problem_type_display_seq[$i]}\">{$problem_type[ $problem_type_display_seq[$i] ]}</a></td>\n";
					if($i % 5 == 0)
						echo '</tr><tr>';
				} ?>
			</tr></table>
			<h2>来源</h2>
			<table class="list"><tr><?php echo "\n";
				include 'var_source.php';
				for($i = 1; $i <= $problem_source_amount; $i++)
				{
					echo "\t\t\t\t\t<td><a href=\"problem_search.php?source=$i\">{$problem_source[$i]}</a></td>\n";
					if($i % 5 == 0)
						echo '</tr><tr>';
				} ?>
			</tr></table>
			<h2>难度</h2>
			<p><?php echo "\n\t\t\t\t\t";
				for($i = 0; $i <= 5; $i++)
					echo "<a href=\"problem_search.php?difficulty=$i\">$i</a>&nbsp;&nbsp;&nbsp;&nbsp;";
				?>
			</p>
<?php include 'module_customsearch.php'; ?>
		</div>
		<div id="sidebar">
<?php
if($_SESSION['login'])
	include 'module_userbox.php';
?>
<?php include 'module_jumpbox.php'; ?>
		</div>
<?php include 'footer.php'; ?>
